keydata == ascii text, the encryption passphrase
keydatalen == how long keydata is
in == the data to be encrypted
out == the encrypted data.
length(in) == length(out), apparently
inlen == length of the in array

=========================================

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <openssl/blowfish.h>
void bfencrypt(unsigned char *keydata, int keydatalen, char *in, char
*out, unsigned int inlen) {
BF_KEY key;
unsigned char ivec[32];
int num=0;
BF_set_key(&key, keydatalen, keydata);
memset(ivec, '\0', 32);
BF_cfb64_encrypt(in, out, inlen, &key, ivec, &num, BF_ENCRYPT);
}

void bfdecrypt(unsigned char *keydata, int keydatalen, char *in, char
*out, unsigned int inlen) {
BF_KEY key;
unsigned char ivec[32];
int num=0;
BF_set_key(&key, keydatalen, keydata);
memset(ivec, '\0', 32);
BF_cfb64_encrypt(in, out, inlen, &key, ivec, &num, BF_DECRYPT);
}